package com.app.enums;

public enum BannerType {
    HOME_CAROUSEL(1, "首页轮播图"),
    HOME_AD(2, "首页广告位"),
    ACTIVITY_CAROUSEL(3, "活动轮播图"),
    ACTIVITY_SECTION(4, "活动板块图"),
    STARTUP_SECTION(5, "创业板块图"),
    LUCKYDRAWCHART(6, "抽奖banner图");

    private final int type;
    private final String typeText;

    BannerType(int type, String typeText) {
        this.type = type;
        this.typeText = typeText;
    }

    public int getType() {
        return type;
    }

    public String getTypeText() {
        return typeText;
    }

    // Usage
    public static String getTypeText(int type) {
        for (BannerType bannerType : BannerType.values()) {
            if (bannerType.getType() == type) {
                return bannerType.getTypeText();
            }
        }
        return "Unknown Type";
    }
}
